Skip to content

test(coverage): ratchet gsd-orchestrator branch gate - #16

Merged
OgeonX-Ai merged 3 commits into
mainfrom
feat/phase-26-coverage-gates
Jul 8, 2026
Merged

test(coverage): ratchet gsd-orchestrator branch gate#16
OgeonX-Ai merged 3 commits into
mainfrom
feat/phase-26-coverage-gates

Conversation

@OgeonX-Ai

Copy link
Copy Markdown
Contributor

Summary

  • Adds coverlet.runsettings declaring the XPlat Code Coverage collector config (cobertura format, SkipAutoProps, ExcludeByAttribute for Obsolete/GeneratedCode/CompilerGenerated/ExcludeFromCodeCoverage, ExcludeByFile globs for obj/, *.g.cs, Program.cs bootstrap)
  • Rewrites the CI "Enforce coverage" step from a permanently-red line-rate < 1.0 check to a ratcheted branch-rate >= $Baseline gate, with CAS JSON telemetry emitted on pass/fail and on missing coverage file
  • Adds 37 new tests (CoverageGapClosingTests.cs) with meaningful assertions targeting previously-uncovered branches: SdlcWorkflowMap.PhaseIdForState full switch, SdlcProfile.ResolveRollbackOrigin fallback paths, GsdWorkflowContext.Transition/WithSdlcVerification branches, LoopPolicyGuard happy/unknown-action paths, NativeProcessCommandExecutor real process spawns (was 0% branch coverage), McpTerminalOutcomePublisher status-mapping switch (was 0% branch coverage)
  • Branch-rate raised from measured baseline 0.6913 to 0.7314 (strictly higher, per plan's ratchet-up requirement); line-rate 0.9082 -> 0.9349
  • All 268 tests pass (231 existing + 37 new)

Executed per .planning/phases/26-test-coverage-automation/26-01-PLAN.md. See 26-01-SUMMARY.md for full details and deferred low-coverage items.

Test plan

  • dotnet test --settings coverlet.runsettings --collect:"XPlat Code Coverage" green locally (Debug and Release)
  • Gate simulated locally against produced cobertura XML: passes at baseline 0.7314, fails closed with correct JSON when baseline artificially raised
  • ci.yml verified ASCII-only

Aitomates added 3 commits July 6, 2026 20:07
…me to prevent checkpoint corruption and replay errors
…clusions

- Configure XPlat Code Coverage collector: cobertura format, SkipAutoProps,
  ExcludeByAttribute (Obsolete/GeneratedCode/CompilerGenerated/ExcludeFromCodeCoverage),
  ExcludeByFile globs for obj/, generated .g.cs, and the Program.cs bootstrap entrypoint
- Measured branch-rate baseline under new settings: 0.6913 (line-rate 0.9082)
- Gitignore TestResults/ build-artifact output
…add coverage tests

- ci.yml "Test" step now passes --settings coverlet.runsettings
- Replace the permanently-red line-rate==100% gate with "Enforce branch coverage
  (ratchet)": parses branch-rate (not line-rate) from coverage.cobertura.xml,
  compares to $Baseline = 0.7314, fails closed with CAS JSON telemetry on
  regression or missing coverage file
- Add CoverageGapClosingTests.cs: 37 new tests with meaningful assertions
  (state, telemetry payload, thrown exception type) targeting previously
  uncovered branches in SdlcWorkflowMap.PhaseIdForState (0.14 -> full switch),
  SdlcProfile.ResolveRollbackOrigin fallback paths, GsdWorkflowContext.Transition
  Failed-state branch, WithSdlcVerification passed-branch, LoopPolicyGuard
  happy-path/unknown-action branches, NativeProcessCommandExecutor (real
  cross-platform process spawns, was 0% branch-rate), and
  McpTerminalOutcomePublisher status-mapping switch (was 0% branch-rate)
- Branch-rate raised from measured Task-1 baseline 0.6913 to 0.7314
  (branches-covered 730/998), line-rate 0.9082 -> 0.9349
- All 268 tests pass (231 existing + 37 new)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bffdee793f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coverlet.runsettings
<Configuration>
<Format>cobertura</Format>
<SkipAutoProps>true</SkipAutoProps>
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute</ExcludeByAttribute>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep async code in coverage

With CI now passing this runsettings file, CompilerGeneratedAttribute causes generated async/iterator state machines to be excluded from the coverage report; Microsoft's runsettings docs warn that excluding this attribute removes code using async, await, yield return, and auto-properties from coverage (https://learn.microsoft.com/en-us/visualstudio/test/customizing-code-coverage-analysis). Most workflow/MCP execution paths in this repo are async, so the branch-rate ratchet can pass while no longer measuring those production branches; remove this attribute and rely on GeneratedCodeAttribute, ExcludeFromCodeCoverageAttribute, and SkipAutoProps for narrower boilerplate exclusions.

Useful? React with 👍 / 👎.

@OgeonX-Ai OgeonX-Ai changed the title Phase 26-01: ratcheted branch-coverage CI gate test(coverage): ratchet gsd-orchestrator branch gate Jul 7, 2026
@OgeonX-Ai
OgeonX-Ai enabled auto-merge (squash) July 8, 2026 17:03
@OgeonX-Ai
OgeonX-Ai merged commit e543e63 into main Jul 8, 2026
5 of 6 checks passed
@OgeonX-Ai
OgeonX-Ai deleted the feat/phase-26-coverage-gates branch July 8, 2026 17:51
OgeonX-Ai added a commit that referenced this pull request Jul 8, 2026
* docs(36-01): refresh README with coverage-gate status and freshness footer

- Remove stale static 35-tests badge
- Add Test Coverage section describing in-progress PR #16 branch-rate gate
- Append docs-verified freshness footer

* docs(36-03): add docs/wiki tree (Home, Architecture, Operations, Decisions)

- Architecture.md documents the goal state machine and contrasts current
  main failure handling with the not-yet-landed Phase 28-01 typed-failure
  retry/halt path (local unpushed branch, no open PR)
- Operations.md verified build/test/CI commands
- Decisions.md indexes phase history and open PRs

---------

Co-authored-by: Kim Harjamäki <kim.harjamaki@prosimo.fi>
OgeonX-Ai added a commit that referenced this pull request Jul 13, 2026
The reusable workflow was pinned to f288e5e3b67b29a2c08880b76da7b852f4a132d0, a pre-squash-merge
branch-tip commit in Coding-Autopilot-System/.github that became
unreachable when .github PR #16 squash-merged and the source branch
was deleted. Every push-triggered release-please run has since failed
with 'workflow was not found'.

Repin to 64c1673088ff7802f1270a44f03bc4d7a10631f2, which is the merged commit on .github's main
branch containing .github/workflows/release-please-reusable.yml.

Co-authored-by: Kim Harjamäki <kim.harjamaki@prosimo.fi>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants